
//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
  {
    //登录
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login',
    meta: {
      title: '登录', //菜单标题
      hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
    },
  },
  {
    path: '/bigData',
    component: () => import('@/views/bigData/index.vue'),
    meta: {
      title: '数据大屏',
      hidden: true,
      icon: 'dataBigScreen'
    },
  },
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      hidden: true,
      icon: ''
    },
  },

  {
    //登录成功以后展示数据的路由
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: {
      title: '',
      hidden: false,
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icon: 'homeIcon'
        },
      },
      {
        path: '/maintenance',
        component: () => import('@/views/maintenance/index.vue'),
        meta: {
          title: '维修工单',
          hidden: true,
          icon: 'maintenance'
        },
      },
      {
        path: '/maintenance/info',
        component: () => import('@/views/maintenance/info.vue'),
        meta: {
          title: '维修工单详情',
          hidden: true,
          icon: 'maintenance'
        },
      },
      {
        path: '/car',
        component: () => import('@/views/parkingManagement/index.vue'),
        meta: {
          title: '停车管理',
          hidden: true,
          icon: 'car'
        },
      },
      {
        path: '/car/info',
        component: () => import('@/views/parkingManagement/info.vue'),
        meta: {
          title: '停车管理详情',
          hidden: true,
          icon: 'car'
        },
      },
      {
        path: '/account',
        component: () => import('@/views/powerManagement/account/index.vue'),
        meta: {
          title: '用户管理',
          hidden: true,
          icon: 'staff'
        },
      },
      {
        path: '/power',
        meta: {
          title: '用户管理',
          hidden: true,
          icon: 'staff'
        },
        children: [
          {
            path: '/power/role',
            component: () => import('@/views/powerManagement/role/index.vue'),
            meta: {
              title: '角色管理',
              hidden: true,
              icon: 'role'
            },
          },
          {
            path: '/power/menu',
            component: () => import('@/views/powerManagement/menu/index.vue'),
            meta: {
              title: '菜单管理',
              hidden: true,
              icon: 'menu'
            },
          },
          {
            path: '/power/account',
            component: () => import('@/views/powerManagement/account/index.vue'),
            meta: {
              title: '用户管理',
              hidden: true,
              icon: 'account'
            },
          },
        ]
      },
      {
        path: '/role',
        component: () => import('@/views/powerManagement/role/index.vue'),
        meta: {
          title: '角色管理',
          hidden: true,
          icon: 'role'
        },
      },
      {
        path: '/menu',
        component: () => import('@/views/powerManagement/menu/index.vue'),
        meta: {
          title: '菜单管理',
          hidden: true,
          icon: 'menu'
        },
      },
      {
        path: '/money',
        component: () => import('@/views/moneyManagement/index.vue'),
        meta: {
          title: '费用管理',
          hidden: true,
          icon: 'money'
        },
      },
      {
        path: '/equipment',
        component: () => import('@/views/equipmentManagement/index.vue'),
        meta: {
          title: '设备管理',
          hidden: true,
          icon: 'equipment'
        },
      },
    ],
  },
  {
    //404
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: true,
      icon: 'DocumentDelete',
    },
  },
]


//任意路由
export const anyRoute = {
  //任意路由
  path: '/:pathMatch(.*)*',
  redirect: '/404',
  name: 'Any',
  meta: {
    title: '任意路由',
    hidden: true,
    icon: 'DataLine',
  },
}
